Skip to main content

Schul-Cloud Roster Service API

Overview

The Roster Service API provides endpoints for retrieving user and group metadata for the Schul-Cloud roster system. The endpoints are defined in feathers js while the actual implementation is done in NestJS and can be found in the schulcloud-server repository

Authentication

  • Type: HTTP Bearer (JWT)

Endpoints

MethodEndpointDescriptionAuth Required
GET/rosterHealth check for roster serviceNo
GET/roster/users/{user}/metadataRetrieves user metadata for rosterNo
GET/roster/users/{user}/groupsRetrieves list of groups for a userNo
GET/roster/groups/{id}Retrieves a single group by IDNo

GET /roster

Health check endpoint to verify the roster service is available. Response: 200 OK - Returns "Roster interface available"


GET /roster/users/{user}/metadata

Retrieves metadata for a specific user.

Parameters:

NameInRequiredDescription
userpathYesUser parameter
pseudonymqueryYesUser pseudonym

Response: 200 OK

{
"data": {
"user_id": "string (24 hex chars)",
"username": "string",
"type": "teacher | student"
}
}

GET /roster/users/{user}/groups

Retrieves all groups (courses) associated with a user.

Parameters:

NameInRequiredDescription
userpathYesUser parameter
toolIdqueryYesTool ID
pseudonymqueryYesUser pseudonym

Response: 200 OK

{
"data": {
"groups": [
{
"group_id": "string (24 hex chars, course ID)",
"name": "string (course name)",
"student_count": "integer (min: 1)"
}
]
}
}

GET /roster/groups/{id}

Retrieves details of a specific group (course or room) including its members.

Parameters:

NameInRequiredDescription
idpathYesID of the group to return

Response: 200 OK

{
"data": {
"students": [
{
"user_id": "string (user pseudonym)",
"username": "string (iframe HTML data)"
}
],
"teachers": [
{
"user_id": "string (user pseudonym)",
"username": "string (iframe HTML data)"
}
]
}
}

Error Responses:

  • 404 Not Found - Group not found
  • 500 Internal Server Error - General error

Data Models

User Types

  • teacher
  • student

Identifiers

  • User IDs and Group IDs (MongoDB ObjectId)